using System;

namespace Mockery.Core
{
    public interface IDisposableContextState
    {
        /// <summary>
        /// Adds any provided non-null disposable instance to the list of items to be disposed
        /// </summary>
        /// <param name="disposableInstance">an instance deriving from IDisposable</param>
        void Add( IDisposable disposableInstance );

        /// <summary>
        /// The count of all items waiting to be disposed
        /// </summary>
        int Count { get; }

        /// <summary>
        /// Performs a Dispose call on each instance in the collected state
        /// </summary>
        void Dispose();
    }
}